//
//  TFTableViewCollectionItem.m
//  AppLibs
//
//  Created by 杜恺 on 2018/7/30.
//  Copyright © 2018年 jack Kong. All rights reserved.
//

#import "TFTableViewCollectionItem.h"
#import "TFTableViewCollectionItemManager.h"

@interface TFTableViewCollectionItem ()

@end

@implementation TFTableViewCollectionItem

@dynamic model;

+ (instancetype)itemWithLayout:(TFTableViewCollectionItemLayout *)layout {
    TFTableViewCollectionItem *item = [self item];
    item.layout = layout;
    [layout layout];
    item.cellHeight = layout.totalHeight;
    return item;
}

- (void)setLayout:(TFTableViewCollectionItemLayout *)layout {
    _layout = layout;
    [_layout layout];
    self.cellHeight = layout.totalHeight;
}

@end
